<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv=Content-Type content="text/html;charset=utf-8" />
        <title>微代理结算申请</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="format-detection" content="telephone=no">
        <link href="{$docroot}static/css/wshop_admin_style.css" type="text/css" rel="Stylesheet" />
        <link href="https://res.wx.qq.com/mpres/htmledition/images/favicon1e5b3a.ico" rel="Shortcut Icon" />
        <script type="text/javascript" src="{$docroot}static/script/jquery-2.1.1.min.js"></script>
        <script type="text/javascript" src="{$docroot}static/script/main.js"></script>
        <script type='text/javascript'>
            $(function() {
                window.onresize = resize;
                resize();
            });
            function resize() {
                var wrapper = document.getElementById('hh');
                wrapper.style.marginTop = ((document.documentElement.clientHeight - wrapper.clientHeight) / 2) + "px";
            }
            function Save(node) {
                var bname = $('#set-form-bankname').val();
                var personname = $('#set-form-accountname').val();
                var account = $('#set-form-account').val();
                if (account !== '' && personname !== '') {
                    node.innerHTML = '提交中';
                    $.post(shoproot + '?/WdminAjax/cashCompanyReq/', {
                        bank_personname: personname,
                        bank_account : account,
                        bank_name: bname,
                        uid: $.cookie('uopenid')
                    }, function(r) {
                        if (parseInt(r) > 0) {
                            alert('申请成功！');
                            location.href = shoproot + '?/Uc/companySpread/';
                        } else {
                            alert('申请失败！');
                        }
                    });
                }
            }
        </script>
    </head>  
    <body style="background: #fff;">
        <div style='width:70%;margin:0 auto;' id='hh'>
            <img src='{$docroot}static/images/logo-source.jpg' height="120px" style='display: block;margin:0 auto'/>
            <div class="gs-label gs-label-h">收款银行</div>
            <div class="gs-text clearfix">
                <input type="text" id="set-form-bankname" />
            </div>
            <div class="gs-label gs-label-h" style="margin-top: 25px;">收款人姓名</div>
            <div class="gs-text clearfix">
                <input type="text" id="set-form-accountname" />
            </div>
            <div class="gs-label gs-label-h" style="margin-top: 25px;">银行账户</div>
            <div class="gs-text clearfix">
                <input type="tel" name="tel" id="set-form-account"/>
            </div>
            <div id="_gmess_edit" style="text-align: center;margin-top: 25px;">
                <a class="wd-btn primary" onclick="Save(this)" style="margin: 0">马上申请</a>
            </div>
        </div>
    </body>
</html>